<?php
//require_once( realpath( dirname( __FILE__ ) . '/../../.apps/classes/tsConfig.class.php' ) );
require_once( 'Database.class.php' );

class User extends Database {

	public function __construct() {
		parent::__construct();
		parent::connect();
	}

	public function getUser($conditions = null){
		$strCond = '';
		$query = '';
		if(is_array($conditions)){
			foreach ($conditions as $key =>$value) {
				$strCond .= $key.' = '.$value . ' ';
			}
			$query = 'SELECT yu.id, yu.user_id
				 FROM user  yu
				 WHERE '.$strCond ;
		}
		else{
			$query = 'SELECT yu.id, yu.user_id
				FROM user  yu';
		}
		return Database::executeSQL($query,2);
	}
}